home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2003 November / PCWK1103B.iso / DesignCAD 3D Max PLUS trial 30 / DATA1.CAB / Example_Files / Sample_Macros / 3D Box from File.d3m < prev    next >
Encoding:
Text File  |  2003-09-29  |  601 b   |  28 lines

  1. ' This simple macro opens an ASCII text file found in the 
  2. ' DesignCAD directory which contains 3 lines.  It then draws a 3D box
  3. ' Starting at XYZ 0, relative to the 3 values found in the file.
  4. '
  5. ' Open the Data file, (*\ denotes the DesignCAD directory).
  6.     open "i", 1, "*\KDW.txt"
  7. ' Retrieve the values from the file
  8.     input #1, KDW1$
  9.     input #1, KDW2$
  10.     input #1, KDW3$
  11. ' Remember to close the file
  12.     Close #1
  13. ' Draw the Box
  14. >Box
  15.     {
  16.       <Color 0,0,0
  17.       <Layer 1
  18.       <PointXYZ 0.0000,0.0000,0.0000
  19.       <PointXYZ [KDW1$, KDW2$, KDW3$]
  20.       }
  21. End
  22. ' Contents of KDW.txt are
  23. 23
  24. 34
  25. 45
  26.  
  27.  
  28.